package function;

import model.Author;
import model.GetAuthors;

import java.util.List;

public class Distinct {
    public static void main(String[] args) {
        List<Author> authors = GetAuthors.getAuthors();
        System.out.println(authors.size());
        authors.stream()
                .distinct()
                .forEach(author -> {
                    System.out.println(author.getName());
                });
    }
}
